import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { RegisterComponent } from './register.component';
import { RegisterUserComponent } from './user';
import { RegisterCompanyComponent } from './company';
import { PagesGuard } from 'app/pages';

const routes: Routes = [
  {
      path: 'register',
      component: RegisterComponent,
      canActivateChild: [PagesGuard],
      children: [
          {path: 'user', component: RegisterUserComponent},
          {path: 'company', component: RegisterCompanyComponent}
      ]
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class RegisterRoutingModule { }

export const routedComponents = [RegisterComponent];